/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: syyyy
 * Date: 2025-07-03
 * Time: 12:11
 */
public class Dog extends Animal{
    public Dog(){
        super("alal",2);
    }

    public Dog(String name, int age) {
        super(name, age);
    }

    //这两种构造方法目的都是先给父类的构造方法赋值

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
